package com.kapukapu.user.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author sivan
 * @since 2020-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_menu")
public class SysMenu implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 资源名称
	 */
	@TableField("name")
	private String name;

	/**
	 * 组件
	 */
	@TableField("component")
	private String component;

	/**
	 * 重定向地址,noredirect的时候该路由在面包屑导航中不可被点击
	 */
	@TableField("redirect")
	private String redirect;

	/**
	 * 类型：1菜单2按钮
	 */
	@TableField("type")
	private Integer type;

	/**
	 * 前端路径
	 */
	@TableField("path")
	private String path;

	/**
	 * 资源地址
	 */
	@TableField("url")
	private String url;

	/**
	 * 方法GET/PUT/POST/DELETE等
	 */
	@TableField("method")
	private String method;

	/**
	 * 权限字符串
	 */
	@TableField("permission")
	private String permission;

	/**
	 * 菜单图标
	 */
	@TableField("ico")
	private String ico;

	/**
	 * 父节点ID
	 */
	@TableField("parent_id")
	private Long parentId;

	/**
	 * 排序
	 */
	@TableField("pos")
	private Integer pos;

	/**
	 * 状态：0不可用1可用
	 */
	@TableField("status")
	private Integer status;

	/**
	 * 修改人ID
	 */
	@TableField("modify_user")
	private Long modifyUser;

	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private LocalDateTime createTime;

	/**
	 * 创建人ID
	 */
	@TableField("create_user")
	private Long createUser;

	/**
	 * 修改时间
	 */
	@TableField("modify_time")
	private LocalDateTime modifyTime;

	public static final String ID = "id";

	public static final String NAME = "name";

	public static final String COMPONENT = "component";

	public static final String REDIRECT = "redirect";

	public static final String TYPE = "type";

	public static final String PATH = "path";

	public static final String URL = "url";

	public static final String METHOD = "method";

	public static final String PERMISSION = "permission";

	public static final String ICO = "ico";

	public static final String PARENT_ID = "parent_id";

	public static final String POS = "pos";

	public static final String STATUS = "status";

	public static final String MODIFY_USER = "modify_user";

	public static final String CREATE_TIME = "create_time";

	public static final String CREATE_USER = "create_user";

	public static final String MODIFY_TIME = "modify_time";

}
